package br.com.cicero.designpatterns.factory;

import br.com.cicero.designpatterns.command.BaseCommand;

public class AplicativoComFactory {
	
	private CommandFactory commandFactory;
	
	public AplicativoComFactory() {
		
		this.commandFactory = new CommandFactory();
		
	}
	
	public void buttonEnviar_clicked() {
		
		BaseCommand comandoEnviar = this.commandFactory.create("EnviarPedido");
		comandoEnviar.executar();
				
	}
	
	public void buttonGerarPDF_clicked() {
		
		BaseCommand comandoGerarPDF = this.commandFactory.create("GerarPDF");
		comandoGerarPDF.executar();
		
	}	

}
